home *** CD-ROM | disk | FTP | other *** search
- Path: anvil.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: What is &Variable (declared as: char Variable[10])?
- Date: 28 Feb 1996 08:33:03 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4h203vINNm29@anvil.ugrad.cs.ubc.ca>
- References: <4gqpa1$3h9@alcor.usc.edu> <4gtab6$acb@ceylon.gte.com> <313318b8.53776146@nntp.ix.netcom.com> <1177@altheim.win-uk.net>
- NNTP-Posting-Host: anvil.ugrad.cs.ubc.ca
-
- In article <1177@altheim.win-uk.net>,
- Brian R. Oldham <broldham@altheim.win-uk.net> wrote:
-
- >I think Brenda is right. No-one has said that arrays are pointers, but
- >the name of an array is. It is the address of the first element of an
-
- Oh really? If the name of an array _is_ a pointer, then how come
-
- sizeof(name_of_array)
-
- doesn't yield the size of a _pointer_?
-
- Gotcha! :)
-
- The name of an array _in certain expression contexts_ collapses into a pointer
- type and value. But you can't say that it _is_ a pointer, because it is not. It
- is an array and that's that.
-
- >array. My understanding is that &myarray is allowable in C++, but not
- >in C. Anyone confirm this?
-
- False. This locution has been blessed by ANSI long ago. It gives a pointer to
- the whole array object, as I have already ``pointed'' out in my other article
- in this thread.
- --
-
-